package com.maywide.jdp.system.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.maywide.jdp.system.entities.Button;

/**
 * 业务功能管理Service接口
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 */
public interface ButtonService extends LockedService {

	/**
	 * 新增业务功能
	 * 
	 * @param button
	 *            业务功能对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Button 新增后的对象
	 */
	public Button insert(Button button, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 修改业务功能
	 * 
	 * @param button
	 *            业务功能对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Button 修改后的对象
	 */
	public Button update(Button button, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 修改业务功能
	 * 
	 * @param button
	 *            业务功能对象
	 * @param appType
	 *            应用类型
	 * @param request
	 *            HttpServletRequest对象
	 * @return Button 修改后的对象
	 */
	public Button updateApp(Button button, String appType,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;

	/**
	 * 读取业务功能
	 * 
	 * @param id
	 *            业务功能ID
	 * @param request
	 *            HttpServletRequest对象
	 * @return Button 读取的业务功能对象
	 */
	public Button load(String id, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * @param ids
	 *            移动的节点ID列表
	 * @param targetID
	 *            移动到的机功能节点ID
	 */
	public void move(List<String> ids, String targetID,
			HttpServletRequest request,
			HttpServletResponse response, HttpSession session) throws Exception;
}
